package com.letv.android.client.episode.widget;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.letv.android.young.client.R;
import com.letv.core.utils.UIsUtils;

public class LetvToastPlayerLibs extends Toast{

	private View view ;
	
	private TextView msgView ;
	
	private ImageView iconView ;
	
	public LetvToastPlayerLibs(Context context) {
		super(context);

		view = UIsUtils.inflate(context, R.layout.letv_ok_toast_layout_playerlibs, null, false);
		msgView = (TextView) view.findViewById(R.id.tosat_msg);
		iconView = (ImageView) view.findViewById(R.id.tosat_icon);
		setGravity(Gravity.CENTER_VERTICAL, 0, 0);
		setView(view);
	}
	public void setMsg(String msg){
		msgView.setText(msg);
	}
	
	public void setMsg(int msg){
		msgView.setText(msg);
	}
	
	public void setErr(boolean isErr){
		if(isErr){
			iconView.setImageResource(R.drawable.letv_err_toast_icon);
		}else{
			iconView.setImageResource(R.drawable.letv_tosat_icon);
		}
	}
	@Override
	public void show() {
		super.show();
	}
}
